home *** CD-ROM | disk | FTP | other *** search
- /*
- CSTRINGS.LBR VERSION 1.0
- Spark Software, Inc.
-
- If you find this software of use, it is requested that you send
- a donation ($10.00 suggested) to:
-
- Spark Software, Inc.
- 24 Royal Crest Dr., #5
- Nashua, NH 03060
-
- Upon receiving your donation, your name will be added to the
- List of Registered Users, and future updates can be obtained
- from the SPARKIE RBBS at (603) 888-8179.
-
- If you include an extra $10.00 with your donation, the newest
- version of CSTRINGS.LBR will be mailed to you.
-
- Call SPARKIE RBBS at the number above for other Spark Software
- products!!!
- */
-
- /*
- * char *
- * strrept (str, n, c)
- * char *str;
- * int n, c;
- *
- * This function returns a pointer to a string (str) consisting of n
- * occurences of character c. The string is assumed to be large
- * enough to hold the result.
- */
-
- char *strrept (str, n, c)
- register char *str;
- register int n, c;
- {
- /* First make sure that it is
- a null terminated string */
- str[n + 1] = '\0';
-
- /* Loop through, and fill the
- new string with character c */
- while (n > 0)
- str[--n] = (char) c;
-
- /* Return the pointer to the result */
- return (str);
-
- } /* strrept */